//
//  PromotionModel.m
//  MBObjectServer
//
//  Created by alfazhu on 3/4/14.
//  Copyright (c) 2014 MBpayer. All rights reserved.
//

#import "PromotionModel.h"

@implementation PromotionModel
+(id) getPromotionModelFromDictionary :(NSDictionary *) dic
{
    PromotionModel * pars = [[PromotionModel alloc]init] ;
    pars.IsSelected = [dic objectForKey:@"IsSelected"];
    pars.PromotionRuleid = [dic objectForKey:@"PromotionRuleid"];
    pars.PromotionRulename = [dic objectForKey:@"PromotionRulename"];
    pars.PromotionRuleno = [dic objectForKey:@"PromotionRuleno"];
    pars.ValidBgDate = [dic objectForKey:@"ValidBgDate"];
    pars.ValidDate = [dic objectForKey:@"ValidDate"];
    return pars ;
}
+(NSMutableDictionary *) getDictionaryFromEPromotionModel :(PromotionModel* ) obj
{
    NSMutableDictionary * dic = [[NSMutableDictionary alloc]init] ;
    [dic setObject:obj.IsSelected forKey:@"IsSelected"];
    [dic setObject:obj.PromotionRuleid forKey:@"PromotionRuleid"];
    [dic setObject:obj.PromotionRulename forKey:@"PromotionRulename"];
    [dic setObject:obj.PromotionRuleno forKey:@"PromotionRuleno"];
    [dic setObject:obj.ValidBgDate forKey:@"ValidBgDate"];
    [dic setObject:obj.ValidDate forKey:@"ValidDate"];
    return dic ;
}
@end
